package com.HomeWorkhsp.chapter10.enumeration;

/**
 * Enjoy programming!!!
 * Time: 2021/12/7 -  21:27
 */
public class Enumeration02 {
    public static void main(String[] args) {
        System.out.println(Season.AUTUMN);
        System.out.println(Season.SPRING);

    }
}
class Season{
    private final String name;
    private final String description;

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    private Season(String name, String description) {
        this.name = name;
        this.description = description;
    }
    public final static Season SPRING = new Season("春天","凉爽");
    public final static Season SUMMER = new Season("夏天","热");
    public final static Season AUTUMN = new Season("秋天","爽");
    public final static Season WINTER = new Season("冬天","凉");

    public String toString(){
        return "Season{" + "name='" + name + '\'' + ",desc='"  + description +
        '\'' + '}';

    }
//    public String toString(){
//        return name;
//    }

}
